package cn.bone.boot01.controller;

import cn.bone.boot01.bean.Person;
import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by superbone on 2018/9/18.
 */
@RestController
public class HelloController {

    @Resource
    Person person;

    @RequestMapping("/hello")
    public String hello(){
        return "hello world...";
    }

    @RequestMapping("/person")
    public Person person(){
        System.out.println(JSON.toJSONString(person));
        return person;
    }
}
